package cn.laike.modules.dev.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import cn.laike.common.utils.PageUtils;
import cn.laike.common.utils.Query;

import cn.laike.modules.dev.dao.RecommendMoneyLogDao;
import cn.laike.modules.dev.entity.RecommendMoneyLogEntity;
import cn.laike.modules.dev.service.RecommendMoneyLogService;


@Service("recommendMoneyLogService")
public class RecommendMoneyLogServiceImpl extends ServiceImpl<RecommendMoneyLogDao, RecommendMoneyLogEntity> implements RecommendMoneyLogService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<RecommendMoneyLogEntity> page = this.selectPage(
                new Query<RecommendMoneyLogEntity>(params).getPage(),
                new EntityWrapper<RecommendMoneyLogEntity>()
        );

        return new PageUtils(page);
    }

	@Override
	public List<Map> queryRecommentList(String parentOpenid, Integer pageNo, Integer pageSize) {

		return baseMapper.queryRecommentList(parentOpenid, (pageNo - 1)*pageSize, pageSize);
	}

}
